package huahua.microservicesimpleconsumermovie.remote;

import huahua.microservicesimpleconsumermovie.entity.User;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author: zhanghuadi
 * @date: 2018/5/4 0004
 * @description: feign调用实现
 */
@FeignClient(name = "user", fallback = UserRemoteHystrix.class)
public interface UserRemote {
    /**
     * 通过id远程获取User信息
     * @param id
     * @return User类型实体
     */
    @RequestMapping("/user/{id}")
    User user(@PathVariable("id") Long id);
}
